local unitName = "Margan_hierophant"

local unitDef = {
name = "Margan Hierophant",
Description = "Margan T2 Artillery.",
objectName = "WL_Margan_hierophant.s3o",
script = "WL_Margan_hierophant_script.lua",
buildPic = "Margan_hierophant.png",
--cost
buildCostMetal = 465,
buildCostEnergy = 5300,
buildTime = 5000,
--Health
maxDamage = 480,
idleAutoHeal = 0,
--Movement
Acceleration = 0.2,
BrakeRate = 0.3,
FootprintX = 2,
FootprintZ = 2,
MaxSlope = 20,
MaxVelocity = 1,
MaxWaterDepth = 20,
MovementClass = "Default2x2",
TurnRate = 600,

sightDistance = 500,

Builder = false,
CanAttack = true,
CanGuard = true,
CanMove = true,
CanPatrol = true,
CanStop = true,
LeaveTracks = false, 

    ExplodeAs = "MEDIUM_UNIT_EXPLOSION",

Category = [[LAND]],

weapons = {
        [1] = {
            def = "orangeblob",
	     onlyTargetCategory = [[LAND]],
        },
    },
}

local weaponDefs = {
    orangeblob = {
name="Crystal launcher",
weaponType=[[MissileLauncher]],

Accuracy=4500,

--Physic/flight path
range=1800,
reloadtime=15,
weaponVelocity=2400,
startVelocity=800,
burst=3,
burstrate=0.1,
weaponAcceleration=200,
flightTime=10,
BurnBlow=1,
FixedLauncher=true,
impulsefactor=0.001,
tolerance=8000,
dance=1,--200
wobble=1000,
				sprayangle = 1200,
tracks=false,
Turnrate=2700,
collideFriendly=true,
TrajectoryHeight = 0.7,
size=6,
InterceptedByShieldType=3,

----APPEARANCE
model="Margan_Ammo.s3o",
smokeTrail=true,
explosionGenerator="custom:purple_EXPLOSION",

----TARGETING
turret=true,
CylinderTargetting=true,
avoidFeature=false,
avoidFriendly=true,


--commandfire=true,

----DAMAGE
damage={
default=350,
},
areaOfEffect=180,
craterMult=0,

--?FIXME***
lineOfSight=true,


--sound
        soundhit = "rapid_rocket_hit",
soundStart="rapidrocket3",
},

}


unitDef.weaponDefs = weaponDefs
return lowerkeys({ [unitName]  =  unitDef })